let mock = require("mockjs")
//网络延迟 增加用户体验
Mock.setup({
    time:'600'
})
// 拓展mockjs 封装获取电话
Mock.Random.extend({
    phone: function () {
      var phonePrefixs = ['190', '136', '150','176'] // 自己写前缀哈
      return this.pick(phonePrefixs) + Mock.mock(/\d{8}/) //Number()
    }
})
Mock.mock('/user/list/1', {
    "userList|20":[{
        "username": "@cname",//随机生成中文名字
        "sex|1-2":2,
        "bTime": "@datetime",//随机生成日期时间
        "address":"@county(true)",//随机生成日期时间地址
        "email": "@email",// 邮箱
        "tel":"@phone",//电话
        "hobby|1-4":["唱歌","跳舞","篮球","足球","排球"]//爱好
    }]
})